package com.yuyou.fn.activity.service;

import com.github.wens.mybatisplus.plugins.Page;
import com.yuyou.fn.activity.entity.ActivityRegSituation;
import com.github.wens.framework.service.ISuperService;
import com.yuyou.fn.activity.vo.*;
import com.yuyou.fn.platform.permission.DataPermission;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;

import java.util.Date;
import java.util.List;

/**
 *
 * ActivityRegSituation 表数据服务层接口
 *
 */
public interface IActivityRegSituationService extends ISuperService<ActivityRegSituation,Long> {

    ActivityRegSituation saveActivityRegSituation(ActivityRegSaveVo activityRegSaveVo);

    void importActivityRegSituation(long acitivityId,List<ImportActivityRegVo> importActivityRegVoList);

    List<ActivityRegSituation> findActivityRegSituationListByNamePhone(Long activityId, String studentName, String studentPhoneNo);

    ActivityRegSituation findActivityRegSituationByNamePhoneSession(Long activityId, String studentName, String studentPhoneNo,Long activityCampusSessionId);

    ActivityRegListVo findActivityRegSessionListByNamePhone(Long activityId, String studentName, String studentPhoneNo);

    /*签到*/
    void signActivityRegSituation(ActivitySignVo activitySignVo);


    Page<ActivityRegSituationDetailVo> findActivityRegSituationPage(DataPermission dataPermission,ActivityRegSituationQueryVo activityRegSituationQueryVo, int pageNo, int pageSize);

    SXSSFWorkbook exportActivityRegSituationDetail(DataPermission dataPermission,ActivityRegSituationQueryVo activityRegSituationQueryVo);

    List<ActivityRegSituation> findByActivityIdsStudentNamePhoneNosReadStatus(List<Long> activityIds,String studentName,List<String> studentPhoneNos,Integer readStatus);

    void updateReadStatusFirstReadTimeByIds(List<Long> activityRegSituationIds, Integer readStatus, Date firstRegTime);

    Long countByActivityCampusSessionId(long activityCampusSessionId);

    List<ActivityRegSituation> findByActivityCampusSessionIds(List<Long> activityCampusSessionIds,String ...columns);

    List<ActivityRegSituation> findActivityRegSituationByActivityIdCampusIds(long activityId,List<Long> campusIds);

    List<ActivityQuantityVo> findActivityQuantityByActivityIds(List<Long> activityIds);

    ActivitySessionNumVo findActivitySessionNum(long activityCampusSessionId);

    List<ActivityRegSituation> findDiagnosisStudent(long activityCampusSessionId);

    ActivityNumVo findActivityNum(long activityCampusId);
}